{% extends "bvblogapp/base.html" %}
{% block pageName %}BioVenturist - Blog Index{% endblock %}


{% block queryScript %}
<link type="text/css" rel="stylesheet" href="/bvblogapp/static/css/bvblogapp.css"></link>

<!--script type="text/javascript" src="/static/js/webtoolkit.scrollabletable.js"></script-->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<!--script type="text/javascript" src="/static/js/webtoolkit.jscrollable.js"></script-->

<!-- begin: Facebox jQuery Plugin-->
<link href="/bvsearchapp/static/js/facebox.css" media="screen" rel="stylesheet" type="text/css"/>
<script src="/bvsearchapp/static/js/facebox.js" type="text/javascript"></script>
<!-- end: Facebox jQuery Plugin-->

<!-- begin: Yahoo UI Datatable -->
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.8.0r4/build/paginator/assets/skins/sam/paginator.css&2.8.0r4/build/datatable/assets/skins/sam/datatable.css">
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.0r4/build/yahoo-dom-event/yahoo-dom-event.js&2.8.0r4/build/datasource/datasource-min.js&2.8.0r4/build/element/element-min.js&2.8.0r4/build/paginator/paginator-min.js&2.8.0r4/build/datatable/datatable-min.js"></script>
<!-- end: Yahoo UI Datatable -->

<script type="text/javascript" src="/bvblogapp/static/js/transform_table.js"></script>

{% endblock %}

{% block headerStrip %}

{% ifnotequal request.user.username username %}		
<div id="strip">		
	<div id="strip_left">
		&nbsp;	
	</div>
</div>
	
{% else %}
<div id="strip">		
	<div id="strip_left">

		<a href="{% url blog_index request.user.username %}" title="Analyses" class="menu_tab">Analyses</a>
		
		<a href="{% url blog_create request.user.username %}" title="Create new analysis" class="menu_tab">Create new analysis</a>

		{% block AdditionalLinks %}<a href="{% url blog_update request.user.username,post.key.id %}" class="menu_tab">Edit</a>
<a href="{% url blog_post_delete request.user.username,post.key.id %}" class="menu_tab">Delete</a>{% endblock %}



	</div>
</div>

{% endifnotequal %}		
{% endblock %}

{% block container %}
<div id="col2">
    <p class="post_date">
        {{ post.created_at|date:"D, d M Y" }}
    </p>
    <h2 class="blog_post_title">{{ post.title }}</h2>
    <div class="post_body">
        {{ post.text|safe }} 
    </div>
    <p class="post_tags">
        <span class="blog_post_tags_title">Tags: </span>{{ post.tags }}
    </p>
    <p class="post_comments">
        <span class="blog_post_comments_title">Comments:</span>
        {{ post.comments_count }}
    </p>

{% include 'bvblogapp/comment_form.html' %}
{% if comments %}<h2 class="bloc_post_comments_title">Comments:</h2>{% endif %}


{% for comment in comments %}
<div class="comment">
    <table>
        <tr>
            <td class="author">
                {{ comment.author }}
            </td>
            <td class="date">
                {{ comment.created_at|date:"d/m/Y"}}
            </td>
        </tr>
    </table>
	<div>{{ comment.text }}</div>
	{% ifequal user post.author %}<a href="{%url blog_post_delete_comment username,post_id,comment.key.id %}">Delete comment</a>{% endifequal %}
	
</div>
{% endfor %}


</div>


{% endblock %}


